/**
 * 
 */
package com.globallogic.training.university;

import java.util.Comparator;

import com.globallogic.training.university.property.Auditorium;

/**
 * Class <Code>ScheduledItemComparator</Code> compares Scheduled Items
 * @author vasiliy.kulgaviy
 *
 */
class ScheduledItemComparator implements Comparator<ScheduledItem> {
	
	/* (non-Javadoc)
	 * @see java.util.Comparator#compare(java.lang.Object, java.lang.Object)
	 */
	@Override
	public int compare(ScheduledItem scheduledItem1, ScheduledItem scheduledItem2) {
		Auditorium auditorium1 = scheduledItem1.getAuditorium();
		Auditorium auditorium2 = scheduledItem2.getAuditorium();
		
		return auditorium1.getId().compareTo(auditorium2.getId());
	}

}
